package com.wanmait.common.util;

import com.google.common.collect.Sets;

import java.text.SimpleDateFormat;
import java.util.Set;

/**
 * @ClassName Constant
 * @Author 羽
 * @Date 2020/12/13 19:56
 * @Version 1.0
 * 封装的一些常量
 **/
public class Constant {
    //日期
    public static final SimpleDateFormat DATE_FORMAT=new SimpleDateFormat("yyyy-MM-dd");
    //时间
    public static final SimpleDateFormat DATE_TIME_FORMAT=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    //超级管理员Id
    public static final Long SUPER_ADMIN = 1L;

    //最顶级的部门Id
    public static final long TOP_DEPT_ID = 0;

    //最顶级的菜单Id
    public static final long TOP_MENU_ID = 0;

    //最顶级的部门名称
    public static final String TOP_DEPT_NAME = "一级部门";

    //最顶级的菜单名称
    public static final String TOP_MENU_NAME = "一级菜单";

    //数据权限过滤
    public static final String SQL_FILTER = "sql_filter";

    //当前页码
    public static final String PAGE = "page";

    //每页显示记录数
    public static final String LIMIT = "limit";

    //排序字段
    public static final String ORDER_FIELD = "sidx";

    //排序方式
    public static final String ORDER = "order";

    //升序
    public static final String ASC = "asc";

    //降序
    public static final String DESC = "desc";

    //指定字段
    public static final String FieldUserId="user_id";

    public static final String FieldCreateTime="create_time";

    //指定的菜单Id不能删除
    public static final Set<Long> MenuIds= Sets.newHashSet(1L,2L,3L,4L,29L,31L);

    public static final String Profiles="dev";

    public static final String DefaultPassword="pmp123456";


    /**
     * 菜单类型
     */
    public enum MenuType {
        //目录
        CATALOG(0),
        //菜单
        MENU(1),
        //按钮
        BUTTON(2);

        private int value;

        MenuType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }


}
